package com.bustle.user.dto.user;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateless;

import com.bustle.commons.Mapper;

@Local
public interface UserDtoMapper extends Mapper<UserDto, UserDto>
{
  @Stateless
  static public class DefaultUserDtoMapper implements UserDtoMapper
  {
    @Override
    public UserDto map(UserDto aSource, UserDto aDestination)
    {
      return dataToDtoMapConverter.map(dtoToDataMapConverter.convert(aSource), aDestination);
    }

    @EJB
    protected DtoToUserMapConverter dtoToDataMapConverter;
    @EJB
    protected UserToDtoMapConverter dataToDtoMapConverter;
  }
}
